#ifndef _SEND_BUF_H
#define _SEND_BUF_H

#include "data.h"

int ssm2_genkey_part2_msg(
	unsigned int cmdno,
	unsigned int idlen,
	unsigned char *id,
	unsigned int xlen,
	unsigned char *x,
	unsigned int ylen,
	unsigned char *y,
	unsigned int *slen,
	unsigned char *sendbuf);

int ssm2_genkey_part2_parse(
	unsigned int cmdno,
	unsigned char *revdata,
	unsigned int revdataLen,
	unsigned char *X,
	unsigned char *Y);

int ssm2_sign_step2_msg(
	unsigned int cmdno,
	unsigned int idlen,
	unsigned char *id,
	unsigned int xlen,
	unsigned char *x,
	unsigned int ylen,
	unsigned char *y,
	unsigned int hashlen,
	unsigned char *hash,
	unsigned int *slen,
	unsigned char *sendbuf);


int ssm2_sign_step2_parse(
	unsigned int cmdno,
	unsigned char *revdata,
	unsigned int revdataLen,
	unsigned int *rLen,
	unsigned char *r,
	unsigned int *ss1Len,
	unsigned char *ss1,
	unsigned int *ss2Len,
	unsigned char *ss2);



int ssm2_decrypt_step2_msg(
	unsigned int cmdno,
	unsigned int idlen,
	unsigned char *id,
	unsigned int xlen,
	unsigned char *x,
	unsigned int ylen,
	unsigned char *y,
	unsigned int *slen,
	unsigned char *sendbuf);

int ssm2_decrypt_step2_parse(
	unsigned int cmdno,
	unsigned char *revdata,
	unsigned int revdataLen,
	unsigned char *X,
	unsigned char *Y);

int ssm2_computekey_step2_msg(
	unsigned int cmdno,
	unsigned int idlen,
	unsigned char *id,
	unsigned int tlen,
	unsigned char *t,
	unsigned int *slen,
	unsigned char *sendbuf);


int ssm2_computekey_step2_parse(
	unsigned int cmdno,
	unsigned char *revdata,
	unsigned int revdataLen,
	unsigned int *XRalen,
	unsigned char *XRa,
	unsigned int *YRalen,
	unsigned char *YRa);

int ssm2_computekey_step4_msg(
	unsigned int cmdno,
	unsigned int idlen,
	unsigned char *id,
	unsigned int i_len,
	unsigned char *i,
	unsigned int *slen,
	unsigned char *sendbuf);

int ssm2_computekey_step4_parse(
	unsigned int cmdno,
	unsigned char *revdata,
	unsigned int revdataLen,
	unsigned int *i_len,
	unsigned char *i);





#endif